#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a = 24;
	int b = 18;
	int c = a % b;
	while (a % b != 0)
	{
	    b = c;
		a = b;
		printf("%d", b);
	}
	return 0;
}